<!DOCTYPE html>
<html lang="ch">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var mooth = prompt("请输入月份");
    // var face = prompt("请输入舱型");
    var du = prompt("请选择舱型")
    var cost;
    // if(face=="头等舱"){
    //     du=0;
    // }else if(face=="经济舱"){
    //     du=1;
    // }
    if(du="头等舱"){
        if(mooth >= 4 && mooth<=10){
            cost = 4000*0.9;
            alert(cost);
        }else if(mooth>10||mooth<4){
            cost = 4000*0.75;
            alert(cost);
        }
    }else if(du="经济舱"){
        if(mooth >= 4 && mooth<=10){
            cost = 4000*0.6;
            alert(cost);
        }else if(mooth>10||mooth<4){
            cost = 4000*0.3;
            alert(cost);
        }
        
    }
</script>